import asyncio

async def delay_print(time,text):
    await asyncio.sleep(time)
    print(text)

async def main():
    print("main start")
    task1 = asyncio.create_task(delay_print(3,"hello"))
    task2 = asyncio.create_task(delay_print(2, "world"))
    print("task create complete")
    await task1
    await task2
    print("main end")
import time

t = time.time()
asyncio.run(main())
print("over")
print(time.time()-t)

import os

# 获取当前Windows用户的主目录
user_home_dir = os.path.expanduser('~')
print(user_home_dir)

